#include<iostream>
#include<stdio.h>
#include<stdlib.h>
#include<algorithm>
#include<cmath>
#include<string.h>
using namespace std; 
char s[]={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
char c[]={'V','W','X','Y','Z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U'}; 
int main()
{  string start,mw,end; 
 while(getline(cin,start)){     
 if(start=="ENDOFINPUT")  break;     
 getline(cin,mw);     
 getline(cin,end);     
 for(int i=0;i<mw.length();i++)      
 if( mw[i]>='A'&&mw[i]<='Z' )  mw[i]=c[ mw[i]-'A' ];    
  cout<<mw<<endl;  }  
  //system("pause");  
  return 0;
}
